const express = require('express');
const router = express.Router();
router.get('/', (req, res) => {
    const content = [];
    for(let i = 0; i < 30; i++)
        content.push({
            id: `2019${i}`,
            vin: `VIN-2019-00-11-x-${i}`,
            vehicleProperty: 1,
            mileage: i,
            licensePlate: `车牌号${i}`,
            engineCode: `engineCode-${i}`,
            transmissionSn: `transmissionSn-${i}`,
            productionDate: '2019-09-12T11:27:39.715Z',
            saleDate: '2019-09-12T11:27:39.715Z',
            shipDate: '2019-09-12T11:27:39.715Z',
            status: 1,
            salesDealerCode: `salesDealerCode-${i}`,
            salesDealerName: `salesDealerName-${i}`,
            customerName: `customerName-${i}`,
            cellPhoneNumber: `400-8888-${i}`,
            productCategoryCode: `productCategoryCode-${i}`,
            productCategoryName: `productCategoryName-${i}`,
            annoucementNumber: `annoucementNumber-${i}`,
            operationsNature: 1,
            isKD: !(i % 2),
        });
    res.json({
        message: '',
        payload: {
            content,
            totalElements: 30
        }
    });
});
router.get('/simple', (req, res) => {
    const content = [];
    for(let i = 0; i < 10; i++)
        content.push({
            id: `2019${i}`,
            vin: `VIN-2019-00-11-x-${i}`,
            vehicleProperty: 1,
            mileage: i,
            licensePlate: `车牌号${i}`,
            engineCode: `engineCode-${i}`,
            transmissionSn: `transmissionSn-${i}`,
            productionDate: '2019-09-12T11:27:39.715Z',
            shipDate: '2019-09-12T11:27:39.715Z',
            saleDate: '2019-09-12T11:27:39.715Z',
            status: 1,
            salesDealerCode: `salesDealerCode-${i}`,
            salesDealerName: `salesDealerName-${i}`,
            customerName: `customerName-${i}`,
            cellPhoneNumber: `400-8888-${i}`,
            productCategoryCode: `productCategoryCode-${i}`,
            productCategoryName: `productCategoryName-${i}`,
            annoucementNumber: `annoucementNumber-${i}`,
            operationsNature: 1,
            isKD: !(i % 2)
        });
    res.json({
        message: '',
        payload: {
            content,
        }
    });
});
router.get('/forCurrentUser', (req, res) => {
    const content = [];
    for(let i = 0; i < 40; i++) content.push({
        id: `2019${i}`,
        vin: `VIN-2019-${i}`,
        vehicleProperty: 1,
        mileage: i,
        licensePlate: `车牌号${i}`,
        engineCode: `engineCode-${i}`,
        transmissionSn: `transmissionSn-${i}`,
        productionDate: '2019-09-12T11:27:39.715Z',
        saleDate: '2019-09-12T11:27:39.715Z',
        status: 1,
        salesDealerCode: `salesDealerCode-${i}`,
        salesDealerName: `salesDealerName-${i}`,
        customerName: `customerName-${i}`,
        cellPhoneNumber: `400-8888-${i}`,
        wholesaleDealerCode: 'string',
        productCode: 'string',
        productName: 'string',
        engineModel: 'string',
        isKdstr: '否',
        isSales: '是',
        options: ['update'],
        countryName: '中国',
        productCategoryCode: 'productCategoryCode',
        registrationCity: 'RegistrationCity',
    });
    res.json({
        message: '',
        payload: {
            content,
            totalElements: 40,
        }
    });
});
router.get('/forGoodWill', (req, res) => {
    const content = [];
    for(let i = 0; i < 40; i++) content.push({
        id: `2020${i}`,
        vin: `VIN-2020-${i}`,
        vehicleProperty: 0,
        mileage: 0,
        licensePlate: 'string',
        engineCode: 'string',
        engineModel: 'string',
        transmissionSn: 'string',
        productionDate: '2020-05-08T05:22:40.018Z',
        salesDate: '2020-05-08T05:22:40.018Z',
        status: 0,
        salesDealerCode: 'string',
        salesDealerName: 'string',
        productCategoryCode: 'string',
        productCategoryName: 'string',
        annoucementNumber: 'string',
        operationsNature: 0,
        isKD: true
    });
    res.json({
        message: '',
        payload: {
            content,
            totalElements: 40,
        }
    });
});
router.get('/:id', (req, res) => {
    res.json(
        {
            message: 'string',
            payload: {
                id: '1',
                wholesaleDealerCode: 'string',
                wholesaleDealerName: 'string',
                vin: 'string',
                licensePlate: 'string',
                mileage: 1,
                lastChangeMileage: 1,
                nextMaintenanceMileage: 1,
                nextMaintenanceTime: '2019-09-25T08:39:03.961Z',
                lastMaintenanceMileage: 1,
                lastMaintenanceTime: '2019-09-25T08:39:03.961Z',
                keyCode: 'string',
                productCode: 'string',
                productName: 'string',
                certificateDate: '2019-09-25T08:39:03.961Z',
                certificateNumber: 'string',
                engineCode: 'string',
                transmissionSn: 'string',
                rolloutDate: '2019-09-25T08:39:03.961Z',
                saleDate: '2019-09-25T08:39:03.961Z',
                salePrice: 1,
                batchNumber: '1111',
                isKD: true,
                saleInvoiceNumber: 'string',
                invoiceDate: '2019-09-25T08:39:03.961Z',
                vehicleProperty: 1,
                remark: 'string',
                salesDealerCode: 'string',
                salesDealerName: 'string',
                vehicleDeliveryDate: '2019-09-25T08:39:03.961Z',
                purchasePurpose: 1,
                Transmission: 'string',
                Ludder: 'string',
                EngineCylinder: 'string',
                Manufacturer: 'string',
                vehicleClaimType: 1,
                powerType: 2,
                transmissionType: 3,
                registrationCity: 'RegistrationCity',
                kdProductCode: '1345646',
                kdProductName: 'DSAFGD',
                kdProductCategoryCode: 'GASDG5646',
                isNewPower: true,
                isOtherBrand: false,
                options: ['update'],
                rowVersion: '#ADDA5646'
            }
        }
    );
});
router.get('/export/forCurrentUser', (req, res) => {
    res.json({
        message: '导出成功'
    });
});

router.get('/forExceptionInfoTransfer', (req, res) => {
    const content = [];
    for(let i = 0; i < 40; i++) content.push({
        id: `${i + 1}`,
        vin: 'string',
        vehicleProperty: 1,
        productCategoryCode: 'string',
        productCategoryName: 'string',
        mileage: 1,
        licensePlate: 'string',
        invoiceDate: '2019-09-21T08:36:12.306Z',
        engineCode: 'string',
        transmissionSn: 'string',
        productionDate: '2019-09-21T08:36:12.306Z',
        saleDate: '2019-09-21T08:36:12.306Z',
        status: 1,
        salesDealerCode: 'string',
        salesDealerName: 'string',
        customerSoldCode: 'string',
        customerSoldName: 'string',
        cellPhoneNumber: 'string',
        address: 'string'
    });
    res.json({
        message: '',
        payload: {
            content,
            totalElements: 40,
        }
    });
});

router.put('/:id', (req, res) => {
    res.json({
        message: '修改成功'
    });
});
module.exports = router;
